package cn.iocoder.yudao.module.system.dal.mysql.workappendage;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.workappendage.WorkAppendageDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.workappendage.vo.*;

/**
 * 工单附属物 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface WorkAppendageMapper extends BaseMapperX<WorkAppendageDO> {

    default PageResult<WorkAppendageDO> selectPage(WorkAppendagePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WorkAppendageDO>()
                .eqIfPresent(WorkAppendageDO::getWorkId, reqVO.getWorkId())
                .eqIfPresent(WorkAppendageDO::getAppendage, reqVO.getAppendage())
                .eqIfPresent(WorkAppendageDO::getAppendageNum, reqVO.getAppendageNum())
                .betweenIfPresent(WorkAppendageDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(WorkAppendageDO::getId));
    }


}
